package com.vstudy.zx.service;

import com.vstudy.zx.entity.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Set;

public interface ArticleService {
    List<Grade> getGrades();

    List<Subject> getSubjects();

    List<Outline> getOutline(Long grade_id, Long subject_id);

    // 保存文章
    boolean saveArticle(String html, String title, Long te_id, Long outline_id, HttpServletRequest request);

    // 根据ID或者文章，级联Teacher，Outline
    Article getArticleById(Long id, HttpServletRequest request);

    ArticleZan getZan(Long article_id, int role, Long role_id);

    boolean zan(Long article_id, int role, Long role_id);

    List<Article> getArticles(Set<Long> ids, HttpServletRequest request);

    int addReadCount(Long article_id);

    StarComments getStarComments(Long article_id, int role, Long te_id);
}
